efa inventory device interface set-admin-state

Brings an interface administratively up or down.

Syntax

efa inventory device interface set-admin-state [--ip device-ip | --if-type eth | --if-name if-list | --state { up | down } ]

Command Default

By default, all ports on the SLX device are down.

Parameters

--if-name if-list
Specifies a comma-separated list of interface names. Example: 0/50-52,0/45,0/5:4,0/5:1-2.
--if-type eth
Specifies that the interface type is Ethernet, which is the default setting.
--ip device-ip
Specifies a comma-separated list of device IP addresses. Example: 10.1.1.13,10.1.1.50,10.1.1.101.
--state { up | down }
State. Can be up or down.

Usage Guidelines

The configuration you set is persisted.

DRC and idempotency are supported.

In SLX-OS, you can use the show interface ethernet command to see the status of the Ethernet interfaces on your device.

Examples

This example changes the Admin Status on one IP address.

efa inventory device interface set-admin-state --ip 10.25.225.167 
--if-name 0/20-22 --state down
+---------------+----+------+----------------+--------------+---------+--------+
|   DeviceIP    | ID | Name | Interface Type | Admin Status | Result  | Reason |
+---------------+----+------+----------------+--------------+---------+--------+
| 10.25.225.167 | 9  | 0/21 | ethernet       | down         | Success |        |
+               +----+------+----------------+--------------+---------+--------+
|               | 89 | 0/20 | ethernet       | down         | Success |        |
+               +----+------+----------------+--------------+---------+--------+
|               | 1  | 0/22 | ethernet       | down         | Success |        |
+---------------+----+------+----------------+--------------+---------+--------+
Interface Details
--- Time Elapsed: 19.5606145s ---

This example attempts to change the Admin Status on two IP addresses, however one IP address is invalid.

efa inventory device interface set-admin-state --ip 10.25.225.167,10.10.10.10 
--if-name 0/20-22 --state down
+---------------+----+------+----------------+--------------+---------+----------------+
|   DeviceIP    | ID | Name | Interface Type | Admin Status | Result  |      Reason     
+---------------+----+------+----------------+--------------+---------+-----------------
| 10.10.10.10   |    |      |                |              | Failed  | Device does not 
|               |    |      |                |              |         | exist with IP: 
                                                                        10.10.10.10
+---------------+----+------+----------------+--------------+---------+----------------+
| 10.25.225.167 | 9  | 0/21 | ethernet       | down         | Success |                |
+               +----+------+----------------+--------------+---------+----------------+
|               | 89 | 0/20 | ethernet       | down         | Success |                |
+               +----+------+----------------+--------------+---------+----------------+
|               | 1  | 0/22 | ethernet       | down         | Success |                |
+---------------+----+------+----------------+--------------+---------+----------------+
Interface Details
--- Time Elapsed: 20.740265s ---

This example changes the Admin State on multiple valid IP addresses.

efa inventory device interface set-admin-state 
--ip 10.25.225.167,10.24.48.131,10.24.51.135 --if-name 0/20-22 --state up

+---------------+-----+------+----------------+--------------+---------+--------+
|   DeviceIP    | ID  | Name | Interface Type | Admin Status | Result  | Reason |
+---------------+-----+------+----------------+--------------+---------+--------+
| 10.24.48.131  | 110 | 0/21 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 142 | 0/20 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 148 | 0/22 | ethernet       | up           | Success |        |
+---------------+-----+------+----------------+--------------+---------+--------+
| 10.24.51.135  | 16  | 0/21 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 48  | 0/22 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 86  | 0/20 | ethernet       | up           | Success |        |
+---------------+-----+------+----------------+--------------+---------+--------+
| 10.25.225.167 | 9   | 0/21 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 89  | 0/20 | ethernet       | up           | Success |        |
+               +-----+------+----------------+--------------+---------+--------+
|               | 1   | 0/22 | ethernet       | up           | Success |        |
+---------------+-----+------+----------------+--------------+---------+--------+
Interface Details
--- Time Elapsed: 56.4964544s ---
This example changes the Admin Status for the specified fabric name.
efa inventory device interface set-admin-state --fabric nc_no_vni 
--if-name 0/20-22 --state up
+--------------+-----+------+----------------+--------------+---------+--------+
|   DeviceIP   | ID  | Name | Interface Type | Admin Status | Result  | Reason |
+--------------+-----+------+----------------+--------------+---------+--------+
| 10.24.51.135 | 48  | 0/22 | ethernet       | up           | Success |        |
+              +-----+------+----------------+--------------+---------+--------+
|              | 16  | 0/21 | ethernet       | up           | Success |        |
+              +-----+------+----------------+--------------+---------+--------+
|              | 86  | 0/20 | ethernet       | up           | Success |        |
+--------------+-----+------+----------------+--------------+---------+--------+
| 10.24.48.131 | 148 | 0/22 | ethernet       | up           | Success |        |
+              +-----+------+----------------+--------------+---------+--------+
|              | 142 | 0/20 | ethernet       | up           | Success |        |
+              +-----+------+----------------+--------------+---------+--------+
|              | 110 | 0/21 | ethernet       | up           | Success |        |
+--------------+-----+------+----------------+--------------+---------+--------+
Interface Details
--- Time Elapsed: 37.9236481s ---